/* 
 * ViaturaBusinessImpl.java
 * 
 * Data de criação: 16/10/2010
 * 
 * O2 SOLUTIONS - SOLUÇÕES EM TECNOLOGIA DA INFORMAÇÃO. 
 *
 */
package br.com.o2solutions.siso.business.impl;

import org.springframework.beans.factory.annotation.Value;

import br.com.o2solutions.core.aop.business.annotation.ApplyRule;
import br.com.o2solutions.core.aop.business.annotation.Business;
import br.com.o2solutions.core.business.BasicBusinessSupport;
import br.com.o2solutions.core.exception.BusinessException;
import br.com.o2solutions.core.integration.repository.DataBaseIntegration;
import br.com.o2solutions.siso.business.rule.viatura.ViaturaInsertUpdateRule;
import br.com.o2solutions.siso.integration.entidade.Viatura;

/**
 * Classe responsável por
 * 
 * @author osvaldeir
 * @since 16/10/2010
 * 
 */
@Business("viaturaBusiness")
public class ViaturaBusinessImpl extends BasicBusinessSupport<Viatura> {

	@Override
	@Value("#{viaturaDAO}")
	public void setDataBaseIntegration(
			DataBaseIntegration<Viatura> dataBaseIntegration) {
		super.setDataBaseIntegration(dataBaseIntegration);
	}

	@Override
	@ApplyRule(rules = ViaturaInsertUpdateRule.class)
	public void save(Viatura entity) throws BusinessException {
		super.save(entity);
	}

	@Override
	@ApplyRule(rules = ViaturaInsertUpdateRule.class)
	public void update(Viatura entity) throws BusinessException {
		super.update(entity);
	}
	
	@Override
	public void remove(Viatura entity) throws BusinessException {
		getDataBaseIntegration().remove(entity);
	}

}
